﻿namespace TestApp
{
    using System.ComponentModel.Composition.Hosting;
    using System.Windows;

    public class TestAppService : IApplicationService
    {
        #region IApplicationService Members

        /// <summary>
        /// Initialize the assembly catalogs for the Silverlight Anlaytics Framework
        /// </summary>
        /// <param name="context">the application service context</param>
        public void StartService(ApplicationServiceContext context)
        {
            CompositionHost.Initialize(new AssemblyCatalog(
                Application.Current.GetType().Assembly),
                new AssemblyCatalog(typeof(Microsoft.WebAnalytics.AnalyticsEvent).Assembly),
                new AssemblyCatalog(typeof(Microsoft.WebAnalytics.Behaviors.TrackAction).Assembly),
                new AssemblyCatalog(typeof(Microsoft.WebAnalytics.Behaviors.Handlers.HandleMediaElement).Assembly),
                new AssemblyCatalog(typeof(Microsoft.WebAnalytics.Controls.HandlePanorama).Assembly),
                new AssemblyCatalog(typeof(Microsoft.WebAnalytics.Media.TrackSMFPlayer).Assembly),
                new AssemblyCatalog(typeof(Microsoft.WebAnalytics.Media.TrackSmoothStreamingMediaElement).Assembly),
                new AssemblyCatalog(typeof(Microsoft.WebAnalytics.Toolkit.HandleDatePicker).Assembly),
                new AssemblyCatalog(typeof(Microsoft.SilverlightMediaFramework.Plugins.SmoothStreaming.SmoothStreamingMediaPlugin).Assembly));
        }

        /// <summary>
        /// Stop the service
        /// </summary>
        public void StopService()
        {
        }
        #endregion
    }
}
